﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Net;
using System.Net.Sockets;

namespace eLibServer.Core
{
  public delegate void OnConnectionAcceptedHandler(object sender, ConnectionAcceptedEventArgs e);
  public class ConnectionAcceptedEventArgs : EventArgs
  {
    public IPEndPoint RemoteEndPoint { get; set; }
    public ConnectionAcceptedEventArgs(IPEndPoint remoteEndPoint)
    {
      this.RemoteEndPoint = remoteEndPoint;
    }
  }

  public delegate void OnStartListeningHandler(object sender, StartListeningEventArgs e);
  public class StartListeningEventArgs : EventArgs
  {
    public int Port { get; set; }
    public StartListeningEventArgs(int port)
    {
      this.Port = port;
    }
  }

  public delegate void OnStopListeningHandler(object sender, EventArgs e);
  
  public delegate void OnClientDisconnectHandler(object sender, OnClientDisconnectEventArgs e);
  public class OnClientDisconnectEventArgs : EventArgs
  {
    public IPEndPoint RemoteEndPoint { get; set; }
    public OnClientDisconnectEventArgs(IPEndPoint remoteEndPoint)
    {
      this.RemoteEndPoint = remoteEndPoint;
    }
  }

}
